import layout from '@/layout'

// 公共路由
export const constantRoutes = [
    {
        path: '/',
        name: '',
        component: layout,
        children: [
            {
                path: '/',
                name: 'Home',
                meta: {
                    title: '首页',
                    icon: 'el-icon-s-home',
                    noCache: true,
                    hidden: false,
                },
                component: () => import('@/views/Home.vue'),
            }
        ]
    }, {
        path: '',
        name: '',
        meta: {
            title: '关于我们',
            icon: '',
            noCache: true,
            hidden: false,
        },
        component: layout,
        children: [
            {
                path: '/about',
                name: 'About',
                meta: {
                    title: '关于我们',
                    icon: '',
                    noCache: true,
                    hidden: false,
                },
                component: () => import('@/views/About.vue'),
            }
        ]
    }, {
        path: "*",
        name: "NotFound",
        hidden: true,
        active: false,
        meta: { title: "404 NotFound" },
        component: () => import("@/views/NotFound.vue")
    },
]

// 动态路由
export const dynamicRoutes = [
    {
        path: '',
        name: '',
        meta: {
            title: '',
            icon: '',
            noCache: true,
            hidden: true,
        },
        component: layout,
        children: [
            {
                path: '/details',
                name: 'Details',
                meta: {
                    title: '文章详情',
                    icon: '',
                    noCache: true,
                    hidden: true,
                },
                component: () => import('@/views/Details.vue'),
            }
        ]
    }, {
        path: '',
        name: '',
        meta: {
            title: '',
            icon: '',
            noCache: true,
            hidden: true,
        },
        component: layout,
        children: [
            {
                path: '/privateMessage',
                name: 'PrivateMessage',
                meta: {
                    title: '私信',
                    icon: '',
                    noCache: true,
                    hidden: true,
                },
                component: () => import('@/views/PrivateMessage.vue'),
            }
        ]
    }, {
        path: '',
        name: '',
        meta: {
            title: '',
            icon: '',
            noCache: true,
            hidden: true,
        },
        component: layout,
        children: [
            {
                path: '/managementCenter',
                name: 'ManagementCenter',
                meta: {
                    title: '管理中心',
                    icon: '',
                    noCache: true,
                    hidden: true,
                },
                component: () => import('@/views/ManagementCenter.vue'),
            }
        ]
    }, {
        path: '',
        name: '',
        meta: {
            title: '',
            icon: '',
            noCache: true,
            hidden: true,
        },
        component: layout,
        children: [
            {
                path: '/startCreating',
                name: 'StartCreating',
                meta: {
                    title: '个人中心',
                    icon: '',
                    noCache: true,
                    hidden: true,
                },
                component: () => import('@/views/StartCreating.vue'),
            }
        ]
    }, {
        path: '',
        name: '',
        meta: {
            title: '',
            icon: '',
            noCache: true,
            hidden: true,
        },
        component: layout,
        children: [
            {
                path: '/search',
                name: 'Search',
                meta: {
                    title: '搜索界面',
                    icon: '',
                    noCache: true,
                    hidden: true,
                },
                component: () => import('@/views/Search.vue'),
            }
        ]
    },
]


export default constantRoutes.concat(dynamicRoutes)
